﻿@page "/daily/meeting";
@namespace YwhWeb.Pages.Daily

<div style="text-align: right;">

    <PageContainer Title="会议纪要" Style="right">
        <Content>   
            <Button @onclick="_=>NewDrawer()">添加会议</Button> 
            
            </Content>

        
            <ChildContent>
            <Table @ref="table"
                   TItem="YwhLib.Meeting"
                   DataSource="@meetingRsp.Items"
                   Total="_total"
                   @bind-PageIndex="_pageIndex"
                   @bind-PageSize="_pageSize"
                   @bind-SelectedRows="selectedRows"
                   OnChange="OnChange">
                <Selection Key="@(context.MeetingId.ToString())" />
                <AntDesign.Column Title="会议编号" @bind-Field="@context.MeetingId" Sortable />
                <AntDesign.Column Title="会议时间" @bind-Field="@context.DateTime" Format="yyyy-MM-dd" Sortable />
                <AntDesign.Column Title="会议地点" @bind-Field="@context.Address" Sortable />
                <AntDesign.Column Title="会议主题" @bind-Field="@context.Subject" />
                <AntDesign.Column Title="主持人" @bind-Field="@context.Host" />
                <AntDesign.Column Title="记录员" @bind-Field="@context.Recorder" />
            </Table>
            </ChildContent>
    </PageContainer>
</div>

<Drawer Visible="this.drawerVisible" Width="500" OnClose="a=>{this.drawerVisible=false;}">
    <Title Level="4">添加会议</Title>
    <div>
    <p ></p>
 </div>

 <Text>会议时间:</Text>
    <div>
    <DatePicker TValue="DateTime" ShowTime="@true"
               DefaultValue=@editMeeting.DateTime
               Format="yyyy-MM-dd HH:mm:ss"
               DisabledDate="date => date <= DateTime.Now"
               DisabledTime="date => GetDisabledTime(date)" 
               />
    <p></p>
</div>

<Text>会议地点:</Text>
    <div>
    <Input Placeholder="请输入会议地点" @bind-Value="@editMeeting.Address"  />
    <p></p>
</div>

<Text>会议主题:</Text>
    <div>
    <Input Placeholder="请输入会议主题" @bind-Value="@editMeeting.Subject"  />
    <p></p>
</div>

<Text>主持人:</Text>
    <div>
    <AutoComplete @bind-Value="@editMeeting.Host" Options="@options" OnSelectionChange="OnSelectionChange"  Placeholder=""/>
    <p></p>
</div>

<Text>记录员:</Text>
    <div>
    <AutoComplete @bind-Value="@editMeeting.Recorder" Options="@options" OnSelectionChange="OnSelectionChange"  Placeholder=""/>
    <p></p>
</div>

<div style="text-align: right;">
    <Button Type="@ButtonType.Primary">保存</Button>
</div>
    </Drawer>
